package com.shaoshaohuo.app.entity;

import com.shaoshaohuo.app.net.HttpConfig;

public class BaseEntity {

	private int code;
	private String msg;
	private int secure;

	

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getSecure() {
		return secure;
	}

	public void setSecure(int secure) {
		this.secure = secure;
	}

	public boolean isOk() {
		if (code == HttpConfig.ResponseCode.OK) {
			return true;
		} else {
			return false;
		}
	}

//	public boolean isCode(String code) {
//		if (respCode != null && respCode.equals(code)) {
//			return true;
//		} else {
//			return false;
//		}
//	}

	public boolean isAuthTokenInvalid() {
		if (code == 100) {
			return true;
		} else {
			return false;
		}
	}

	@Override
	public String toString() {
		return "BaseEntity [code=" + code + ", msg=" + msg + ", secure="
				+ secure + "]";
	}
	
	

}
